<html><head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8"><title>ReadProgramData</title></head>
<body bgcolor="#EFF1F0" link="#3A3966" vlink="#000000" alink="#000000">
<font face="Verdana, sans-serif" size="2"><p align="center"><b><font size="4">ReadProgramData()</font></b></p>
<p><b>语法</b></p><blockquote>

Result = <font color="#3A3966"><b>ReadProgramData</b></font>(Program, *Buffer, Size)</blockquote>

</blockquote>
<b>概要</b><br><blockquote>



Reads data from the given programs output (stdout) and puts it in the specified buffer. 
This function waits until there is data available to read from the program. To prevent this wait, 
<a href="availableprogramoutput.html">AvailableProgramOutput()</a> may be used first to check if there is 
something to read. 

 

</blockquote><p><b>参数</b></p><blockquote>
<style type="text/css">
table.parameters { border-spacing: 0px; border-style: none; border-collapse: collapse; }
table.parameters td { border-width: 1px; padding: 6px; border-style: solid; border-color: gray; vertical-align: top; font-family:Arial; font-size:10pt; }
</style>
<table width="90%" class="parameters">
<tr><td width="10%"><i>Program</i></td>
<td width="90%"> 
 
The program to use. It must have been started before with <a href="runprogram.html">RunProgram()</a> and the <font color="#924B72">#PB_Program_Read</font> flag. 

 

</td></tr>
<tr><td><i>*Buffer</i></td>
<td> 
 
The memory buffer to read the data into. A memory buffer can be created for example with <a href="../memory/allocatememory.html">AllocateMemory()</a>. 

 

</td></tr>
<tr><td><i>Size</i></td>
<td> 
 
The size to read, in bytes. The buffer should be large enough to handle this size. 

 

</td></tr>
</table>
</blockquote><p><b>返回值</b></p><blockquote>



The number of bytes actually read. 

 

</blockquote><p><b>备注</b></p><blockquote>



The function reads up to 'size' bytes, but also less if not that much is available (but it will not return 
zero bytes because it always waits for some data to read). 

 

</blockquote><p><b>参阅</b></p><blockquote>

<a href="readprogramstring.html">ReadProgramString()</a> 

</Blockquote><p><b>已支持操作系统 </b><Blockquote>所有</Blockquote></p><center>&lt;- <a href=programrunning.html>ProgramRunning()</a> - <a href="index.html">Process Index</a> - <a href="readprogramerror.html">ReadProgramError()</a> -&gt;<br><br>

</body></html>